//
// Created by Soar Qin on 2017/8/18.
// Copyright (c) 2017 Soar Qin. All rights reserved.
//

#pragma once

namespace core::async {

struct LoopContext;

class Loop {
    friend class IoBase;
    DISABLE_CLASS_COPY(Loop);
public:
    Loop();
    virtual ~Loop();

    void run();

    inline LoopContext *getContext() { return context_; }

private:
    LoopContext *context_;

private:
    static bool initialized_;
};

}
